<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilsecure: Xilsecure RSA QMODE Server APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilsecure
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xsecure__rsa__qmode__apis.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Xilsecure RSA QMODE Server APIs</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gaa653fc0677efc4a466e7f5360dbc2abe"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__rsa__qmode__apis.html#gaa653fc0677efc4a466e7f5360dbc2abe">externC</a>&#160;&#160;&#160;extern</td></tr>
<tr class="memdesc:gaa653fc0677efc4a466e7f5360dbc2abe"><td class="mdescLeft">&#160;</td><td class="mdescRight">For compilation in C++.  <a href="#gaa653fc0677efc4a466e7f5360dbc2abe">More...</a><br/></td></tr>
<tr class="separator:gaa653fc0677efc4a466e7f5360dbc2abe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga38e1b28752d6069910cf90fb422e9cca"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__rsa__qmode__apis.html#ga38e1b28752d6069910cf90fb422e9cca">XSECURE_ECDSA_RSA_SOFT_RESET</a>&#160;&#160;&#160;(0xF1200040U)</td></tr>
<tr class="memdesc:ga38e1b28752d6069910cf90fb422e9cca"><td class="mdescLeft">&#160;</td><td class="mdescRight">ECDSA/RSA soft reset address.  <a href="#ga38e1b28752d6069910cf90fb422e9cca">More...</a><br/></td></tr>
<tr class="separator:ga38e1b28752d6069910cf90fb422e9cca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacba3eaa97a1cf39d9022dddcaded8e1b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__rsa__qmode__apis.html#gacba3eaa97a1cf39d9022dddcaded8e1b">XSECURE_RSA_SIZE_IN_BYTES</a>&#160;&#160;&#160;(512U)</td></tr>
<tr class="memdesc:gacba3eaa97a1cf39d9022dddcaded8e1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">512 bytes for 4096 bit data  <a href="#gacba3eaa97a1cf39d9022dddcaded8e1b">More...</a><br/></td></tr>
<tr class="separator:gacba3eaa97a1cf39d9022dddcaded8e1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga127677299bd2c7d46a4cf8941e91ccc3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__rsa__qmode__apis.html#ga127677299bd2c7d46a4cf8941e91ccc3">XSECURE_PRIME_FACTOR_MAX_P_SIZE</a>&#160;&#160;&#160;(<a class="el" href="group__xsecure__rsa__qmode__apis.html#gacba3eaa97a1cf39d9022dddcaded8e1b">XSECURE_RSA_SIZE_IN_BYTES</a> &gt;&gt; 1U)</td></tr>
<tr class="memdesc:ga127677299bd2c7d46a4cf8941e91ccc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">256 bytes size of first prime factor(P)  <a href="#ga127677299bd2c7d46a4cf8941e91ccc3">More...</a><br/></td></tr>
<tr class="separator:ga127677299bd2c7d46a4cf8941e91ccc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae905dfaa14a252d9b935b0f5ce8e7583"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__rsa__qmode__apis.html#gae905dfaa14a252d9b935b0f5ce8e7583">XSECURE_PRIME_FACTOR_MAX_Q_SIZE</a>&#160;&#160;&#160;(<a class="el" href="group__xsecure__rsa__qmode__apis.html#gacba3eaa97a1cf39d9022dddcaded8e1b">XSECURE_RSA_SIZE_IN_BYTES</a> &gt;&gt; 1U)</td></tr>
<tr class="memdesc:gae905dfaa14a252d9b935b0f5ce8e7583"><td class="mdescLeft">&#160;</td><td class="mdescRight">256 bytes size of first prime factor(Q)  <a href="#gae905dfaa14a252d9b935b0f5ce8e7583">More...</a><br/></td></tr>
<tr class="separator:gae905dfaa14a252d9b935b0f5ce8e7583"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac68769cb4d2f865843c2e77b2b5c3fbd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__rsa__qmode__apis.html#gac68769cb4d2f865843c2e77b2b5c3fbd">XSECURE_RSA_PUB_EXP_SIZE</a>&#160;&#160;&#160;(4U)</td></tr>
<tr class="memdesc:gac68769cb4d2f865843c2e77b2b5c3fbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">RSA public exponent size.  <a href="#gac68769cb4d2f865843c2e77b2b5c3fbd">More...</a><br/></td></tr>
<tr class="separator:gac68769cb4d2f865843c2e77b2b5c3fbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gae1a74baadcd5d96038076e38a6af64e1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__rsa__qmode__apis.html#gae1a74baadcd5d96038076e38a6af64e1">XSecure_RsaExpCRT</a> (u8 *Hash, u8 *P, u8 *Q, u8 *Dp, u8 *Dq, u8 *Qinv, u8 *Pub, u8 *Mod, int Len, u8 *Res)</td></tr>
<tr class="memdesc:gae1a74baadcd5d96038076e38a6af64e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs the RSA exponentiation using CRT (Chinese Remainder Theorem).  <a href="#gae1a74baadcd5d96038076e38a6af64e1">More...</a><br/></td></tr>
<tr class="separator:gae1a74baadcd5d96038076e38a6af64e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab93e9d20b03a5821f0b533b3c0a1f681"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__rsa__qmode__apis.html#gab93e9d20b03a5821f0b533b3c0a1f681">XSecure_RsaExp</a> (u8 *Hash, u8 *Exp, u8 *Mod, u8 *P, u8 *Q, u8 *Pub, u8 *Tot, int Len, u8 *Res)</td></tr>
<tr class="memdesc:gab93e9d20b03a5821f0b533b3c0a1f681"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs the RSA exponentiation.  <a href="#gab93e9d20b03a5821f0b533b3c0a1f681">More...</a><br/></td></tr>
<tr class="separator:gab93e9d20b03a5821f0b533b3c0a1f681"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6d3412455d770af7b891c3c90df4dffd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__rsa__qmode__apis.html#ga6d3412455d770af7b891c3c90df4dffd">XSecure_RsaExpopt</a> (u8 *Hash, u8 *Exp, u8 *Mod, u8 *RN, u8 *RRN, u8 *P, u8 *Q, u8 *Pub, u8 *Tot, int Len, u8 *Res)</td></tr>
<tr class="memdesc:ga6d3412455d770af7b891c3c90df4dffd"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function perofrms the RSA exponentiation using pre-calculated modulus.  <a href="#ga6d3412455d770af7b891c3c90df4dffd">More...</a><br/></td></tr>
<tr class="separator:ga6d3412455d770af7b891c3c90df4dffd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="gaa653fc0677efc4a466e7f5360dbc2abe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define externC&#160;&#160;&#160;extern</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>For compilation in C++. </p>

</div>
</div>
<a class="anchor" id="ga38e1b28752d6069910cf90fb422e9cca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_ECDSA_RSA_SOFT_RESET&#160;&#160;&#160;(0xF1200040U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ECDSA/RSA soft reset address. </p>

</div>
</div>
<a class="anchor" id="ga127677299bd2c7d46a4cf8941e91ccc3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_PRIME_FACTOR_MAX_P_SIZE&#160;&#160;&#160;(<a class="el" href="group__xsecure__rsa__qmode__apis.html#gacba3eaa97a1cf39d9022dddcaded8e1b">XSECURE_RSA_SIZE_IN_BYTES</a> &gt;&gt; 1U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>256 bytes size of first prime factor(P) </p>

</div>
</div>
<a class="anchor" id="gae905dfaa14a252d9b935b0f5ce8e7583"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_PRIME_FACTOR_MAX_Q_SIZE&#160;&#160;&#160;(<a class="el" href="group__xsecure__rsa__qmode__apis.html#gacba3eaa97a1cf39d9022dddcaded8e1b">XSECURE_RSA_SIZE_IN_BYTES</a> &gt;&gt; 1U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>256 bytes size of first prime factor(Q) </p>

</div>
</div>
<a class="anchor" id="gac68769cb4d2f865843c2e77b2b5c3fbd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_RSA_PUB_EXP_SIZE&#160;&#160;&#160;(4U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>RSA public exponent size. </p>

</div>
</div>
<a class="anchor" id="gacba3eaa97a1cf39d9022dddcaded8e1b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_RSA_SIZE_IN_BYTES&#160;&#160;&#160;(512U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>512 bytes for 4096 bit data </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gab93e9d20b03a5821f0b533b3c0a1f681"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_RsaExp </td>
          <td>(</td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Hash</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Exp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Mod</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Q</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Pub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Tot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function performs the RSA exponentiation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Hash</td><td>is Hash of the exponentiation. </td></tr>
    <tr><td class="paramname">Exp</td><td>is exponent, a positive integer. </td></tr>
    <tr><td class="paramname">Mod</td><td>is public modulus (p*q), NULL is invalid param. </td></tr>
    <tr><td class="paramname">P</td><td>is first factor, a positive integer. </td></tr>
    <tr><td class="paramname">Q</td><td>is second factor, a positive integer. </td></tr>
    <tr><td class="paramname">Pub</td><td>is public exponent to protect against the fault insertions. </td></tr>
    <tr><td class="paramname">Tot</td><td>is totient, a secret value equal to (p-1)*(q-1). if NULL, calculated internally with p and q. </td></tr>
    <tr><td class="paramname">Len</td><td>is length of the full-length integer in bits. </td></tr>
    <tr><td class="paramname">Res</td><td>is result of exponentiation r = (h^e) mod n.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On success.</li>
<li>XSECURE_RSA_EXPONENT_INVALID_PARAM If any input parameter is invalid.</li>
<li>XST_FAILURE On failure. </li>
</ul>
</dd></dl>
<p>Validate input parameters</p>
<p>Release the RSA engine from reset</p>
<p>Perform the RSA exponentiation</p>
<p>Reset the RSA engine </p>

<p>References <a class="el" href="group__xsecure__rsa__server__apis.html#ga38e1b28752d6069910cf90fb422e9cca">XSECURE_ECDSA_RSA_SOFT_RESET</a>, <a class="el" href="group__xsecure__generic__server__apis.html#gae500e79a22c37a14027ce0ad88a8cafe">XSecure_Out32</a>, and <a class="el" href="group__xsecure__error__codes.html#ggacba8dc046b878afa42fdc63ce1dc2574abec901590074cb2fc5128fcfeb2fe6be">XSECURE_RSA_EXPONENT_INVALID_PARAM</a>.</p>

</div>
</div>
<a class="anchor" id="gae1a74baadcd5d96038076e38a6af64e1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_RsaExpCRT </td>
          <td>(</td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Hash</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Q</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Dp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Dq</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Qinv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Pub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Mod</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function performs the RSA exponentiation using CRT (Chinese Remainder Theorem). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Hash</td><td>is the Hash of the exponentiation. </td></tr>
    <tr><td class="paramname">P</td><td>is first factor, a positive integer. </td></tr>
    <tr><td class="paramname">Q</td><td>is second factor, a positive integer. </td></tr>
    <tr><td class="paramname">Dp</td><td>is first factor's CRT exponent, a positive integer. </td></tr>
    <tr><td class="paramname">Dq</td><td>is second factor's CRT exponent, a positive integer. </td></tr>
    <tr><td class="paramname">Qinv</td><td>is (first) CRT coefficient, a positive integer. </td></tr>
    <tr><td class="paramname">Pub</td><td>is the public exponent to protect against the fault insertions. </td></tr>
    <tr><td class="paramname">Mod</td><td>is the public modulus (p*q), if NULL, calculated internally. </td></tr>
    <tr><td class="paramname">Len</td><td>is length of the full-length integer in bits. </td></tr>
    <tr><td class="paramname">Res</td><td>is result of exponentiation r = (h^e) mod n.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On success.</li>
<li>XSECURE_RSA_EXPONENT_INVALID_PARAM If any input parameter is invalid.</li>
<li>XST_FAILURE On failure. </li>
</ul>
</dd></dl>
<p>Validate input parameters</p>
<p>Release the RSA engine from reset</p>
<p>Perform the RSA exponentiation using CRT</p>
<p>Reset the RSA engine </p>

<p>References <a class="el" href="group__xsecure__rsa__server__apis.html#ga38e1b28752d6069910cf90fb422e9cca">XSECURE_ECDSA_RSA_SOFT_RESET</a>, <a class="el" href="group__xsecure__generic__server__apis.html#gae500e79a22c37a14027ce0ad88a8cafe">XSecure_Out32</a>, and <a class="el" href="group__xsecure__error__codes.html#ggacba8dc046b878afa42fdc63ce1dc2574abec901590074cb2fc5128fcfeb2fe6be">XSECURE_RSA_EXPONENT_INVALID_PARAM</a>.</p>

<p>Referenced by <a class="el" href="group__xsecure__rsa__server__apis.html#ga7fe869dab6a634c2866f9ec26ee8cec0">XSecure_RsaOaepDecrypt()</a>.</p>

</div>
</div>
<a class="anchor" id="ga6d3412455d770af7b891c3c90df4dffd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_RsaExpopt </td>
          <td>(</td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Hash</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Exp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Mod</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>RN</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>RRN</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Q</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Pub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Tot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function perofrms the RSA exponentiation using pre-calculated modulus. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Hash</td><td>is Hash of the exponentiation. </td></tr>
    <tr><td class="paramname">Exp</td><td>is exponent, a positive integer. </td></tr>
    <tr><td class="paramname">Mod</td><td>is public modulus (p*q), NULL is invalid param. </td></tr>
    <tr><td class="paramname">RN</td><td>is pre-calculated modulus RmodN </td></tr>
    <tr><td class="paramname">RRN</td><td>is pre-calculated modulus RRmodN </td></tr>
    <tr><td class="paramname">P</td><td>is first factor, a positive integer. </td></tr>
    <tr><td class="paramname">Q</td><td>is second factor, a positive integer. </td></tr>
    <tr><td class="paramname">Pub</td><td>is public exponent to protect against the fault insertions. </td></tr>
    <tr><td class="paramname">Tot</td><td>is totient, a secret value equal to (p-1)*(q-1). if NULL, calculated internally with p and q. </td></tr>
    <tr><td class="paramname">Len</td><td>is length of the full-length integer in bits. </td></tr>
    <tr><td class="paramname">Res</td><td>is result of exponentiation r = (h^e) mod n.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On success.</li>
<li>XSECURE_RSA_EXPONENT_INVALID_PARAM If any input parameter is invalid.</li>
<li>XST_FAILURE On failure. </li>
</ul>
</dd></dl>
<p>Validate input parameters</p>
<p>Release the RSA engine from reset</p>
<p>Perform the RSA exponentiation with pre-calculated modulus</p>
<p>Reset the RSA engine </p>

<p>References <a class="el" href="group__xsecure__rsa__server__apis.html#ga38e1b28752d6069910cf90fb422e9cca">XSECURE_ECDSA_RSA_SOFT_RESET</a>, <a class="el" href="group__xsecure__generic__server__apis.html#gae500e79a22c37a14027ce0ad88a8cafe">XSecure_Out32</a>, and <a class="el" href="group__xsecure__error__codes.html#ggacba8dc046b878afa42fdc63ce1dc2574abec901590074cb2fc5128fcfeb2fe6be">XSECURE_RSA_EXPONENT_INVALID_PARAM</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
